package com.uliky.shouyiLibrary.member;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * 远程调用步骤
 * 1.引入openfeign
 * 2.编写接口，告诉sringcloud需要调用远程服务
 *  @FeignClient("shouyiLibrary-coupon")
 *  public interface CouponFeignService {
 *     //路径注意写全，有些接口有定义统一的路径前缀
 *     @RequestMapping("/coupon/coupon/member/list")
 *     public R membercoupons() ;
 *  }
 *  声明接口的没一个方法都是调用的哪个微服务的哪个请求
 *  3.开启远程调用的功能
 *  @EnableFeignClients(basePackages = "com.uliky.shouyiLibrary.member.feign")
 */
@SpringBootApplication
@EnableDiscoveryClient
@EnableRedisHttpSession
@EnableFeignClients(basePackages = "com.uliky.shouyiLibrary.member.feign")
public class ShouyiLibraryMemberApplication {

    public static void main(String[] args) {
        SpringApplication.run(ShouyiLibraryMemberApplication.class, args);
    }

}
